package com.bigfire.dtm.starter;

import org.axonframework.springboot.autoconfig.AxonServerAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 结算中心服务启动
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年01月03日 20:41
 */
//@EnableJpaAuditing
@EnableTransactionManagement
@EntityScan(basePackages = {"com.bigfire.dtm.dal.entity",
        "org.axonframework.eventsourcing.eventstore.jpa",
        "org.axonframework.modelling.saga.repository.jpa",
        "org.axonframework.eventhandling.tokenstore.jpa"})
@EnableJpaRepositories(basePackages = {"com.bigfire.dtm.dal.entity"})
@EnableAspectJAutoProxy(proxyTargetClass = true)
@SpringBootApplication(scanBasePackages = {"com.bigfire.dtm"},
        exclude = AxonServerAutoConfiguration.class)
@EnableFeignClients(basePackages = {"com.bigfire.dtm.api"})
public class BigfireApplication {
    public static void main(String[] args) {
        SpringApplication.run(BigfireApplication.class, args);
    }
}
